/* 
 *	Copyright (C) 2009-2010 miaohua
 *	http://code.google.com/p/lrcshower/
 *
 *  This Program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  This Program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with GNU Make; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 *  http://www.gnu.org/copyleft/gpl.html
 *
 */

#pragma once
#include "TypeDef.h"

// Render interface
class IRender
{
public:
    // Deconstrunctor
    virtual ~IRender()=0{}

    // Change the render's property 
    virtual bool ChangeBgClr(COLORREF Clr)=0;
    virtual bool ChangeBgTransparent(BYTE Transparent)=0;
    virtual bool ChangeFocusLineClr(COLORREF UpperClr, COLORREF MidClr, COLORREF LowerClr)=0;
    virtual bool ChangeUnFocusLineClr(COLORREF UpperClr, COLORREF MidClr, COLORREF LowerClr)=0;
    virtual bool ChangeLrcTransparent(BYTE Transparent)=0;
	virtual bool ChangeFont(const TCHAR * FontName, int FontSize)=0;
	virtual bool ChangeFont(const LOGFONT* font)=0;
    virtual bool ChangeKaraokeMode(bool Mode)=0;
    virtual bool ChangeShadowMode(bool Mode)=0;
	virtual bool ChangeOutlineMode(bool Mode)=0;

    // Get the containing box size for LrcLine
    virtual SIZE GetLrcBoxSize(HWND RendWin, const tstring & LrcLine)=0;
    // Before call render,call StartOneLine at first to let render do some initialization
    // The input parameter IsNew indicates wether it is a new line for render
	virtual bool StartOneLine(HWND RendWin, const tstring & Lrc, bool IsNew)=0;
    // Render the text to assigned windows
    virtual bool Render(HWND RendWin, const tstring & Lrc, unsigned int FocusLen)=0;
    // Rend background to assigned windows
    virtual bool RenderBg(HWND RendWin)=0;
    // Flush the painted buffer to screen
	virtual bool Flush(HWND RendWin, const tstring & Lrc, unsigned int FocusLen, bool IsNew)=0;
};